#!/usr/bin/env python
# encoding: utf-8
"""
@summary: 测试for遍历
@author: hongxingfan
@since: 2014年8月12日    上午11:13:10
"""

if __name__ == '__main__':
    list = ["a","b","c"]
    
    len = len(list)
    
    for (index,element) in enumerate(list):
        if index == len - 1:
            if element != "d":
                list.append("d")
    
    for l in list:
        print(l)